package com.metamedia.test;

public class Sum extends Operation {
	double[] numbers;

	public Sum(double... numbers) {
		this.numbers = numbers;
	}

	@Override
	public Double compute() {
		double sum = 0;
		for (double number : numbers)
			sum += number;
		return sum;
	}

	@Override
	public String getName() {
		return "SUM";
	}

}
